﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pibby.Core
{
	/// <summary>
	/// Used in ... podcast-related events (surprised?)
	/// </summary>
	public class PodcastEventArgs : System.EventArgs
	{
		public PodcastEventArgs()
			: this(string.Empty)
		{
		}

		public PodcastEventArgs(string guid)
		{
			this.Guid = guid;
		}

		public PodcastEventArgs(int id)
			: this(id, string.Empty, null)
		{
		}

		public PodcastEventArgs(int id, string name)
			: this(id, name, null)
		{
		}

		public PodcastEventArgs(int id, string name, Exception ex)
		{
			this.DbKey = id;
			this.Name = name;
			this.Exception = ex;
		}

		public int DbKey
		{
			get;
			private set;
		}

		public string Guid
		{
			get;
			private set;
		}

		public string Name
		{
			get;
			private set;
		}

		public Exception Exception
		{
			get;
			private set;
		}
	}

	public class SearchEventArgs : System.EventArgs
	{
		public SearchEventArgs(string search)
		{
			this.Search = search;
		}

		public string Search
		{
			get;
			private set;
		}
	}

	public class PodcastSearchEventArgs : System.EventArgs
	{
		public PodcastSearchEventArgs(int dbKey, string search)
		{
			this.Dbkey = dbKey;
			this.Search = search;
		}

		public int Dbkey
		{
			get;
			private set;
		}

		public string Search
		{
			get;
			private set;
		}
	}

	public class RenamePodcastEventArgs : PodcastEventArgs
	{
		public RenamePodcastEventArgs(int dbKey, string newName)
			: base(dbKey)
		{
			this.NewName = newName;
		}

		public string NewName
		{
			get;
			private set;
		}
	}

	public class RemovePodcastEventArgs : PodcastEventArgs
	{
		public RemovePodcastEventArgs(int dbKey, bool deleteEpisodes)
			: base(dbKey)
		{
			this.DeleteEpisodes = deleteEpisodes;
		}

		public bool DeleteEpisodes
		{
			get;
			private set;
		}
	}
}
